package be.novelfaces.component.input;

import java.io.IOException;

import javax.faces.context.FacesContext;

import org.richfaces.cdk.annotations.JsfRenderer;

import be.novelfaces.component.util.element.InputWriter;

@JsfRenderer(family = "be.novelfaces.component", //
type = "be.novelfaces.component.InputTextRenderer")
public class InputTextRenderer extends AbstractInputRenderer<InputText> {

	@Override
	public void encodeEndComponent(FacesContext facesContext, InputText component) throws IOException {
		InputWriter.getInstance().startElement(component)
				.getAttributesWriterBuilder(component)
				.withAllAttributesForInputText().writeAttributes().endElement();
	}

	@Override
	protected void encodeBeginComponent(FacesContext facesContext,
			InputText component) {
		
	}

	@Override
	protected Class<InputText> getComponentClass() {
		return InputText.class;
	}
	
}
